
local cmdname = "aids_rocketban"

if CLIENT then

	local args = { { Name = "Kill Mode", Value = false },
	{ Name = "Ban Mode", Value = true } }

	AIDS.RegisterCommand( "Rocket Ban", cmdname, "rocket", args ) 

else
	
	local function RocketmanPlayer( ply, cmd, args )
	
		local target = AIDS.GetPlayer( args[1] )
		
		if target and ( ( !target:IsAdmin() and !target:IsSuperAdmin() ) or not tobool( args[2] ) ) then
		
			local rocket = ents.Create( "sent_rocketman" )
			rocket:SetPos( target:GetPos() )
			rocket:SetOwner( target )
			rocket:SetParent( target )
			rocket:Spawn()
			
			target:SetVelocity( Vector( 0, 0, 250 ) )
			target:StripWeapons()
			
			local bool = tobool( args[2] )
			
			if bool then
			
				AIDS.ChatPrint( { target, " is on his way to the Ban Planet. Godspeed, you magnificent bastard." } )
				
				target:Ban( 0, "Sent to the Ban Planet." )
				
			else
			
				rocket:SetKick( false )
			
				AIDS.ChatPrint( { target, " is on his way to the moon. Godspeed, you magnificent bastard." } )
			
			end
			
		end
	
	end
	
	AIDS.AddCommand( RocketmanPlayer, cmdname )
	
end